<script src="../lib/jquery.js"></script>
<script>
$(function(){
	//The .html() method used as a setter:
	$( "h1" ).html( "hello world" );
	
	//The .html() method used as a getter:
	console.log($( "h1" ).html());
	
	// Chaining
	$( "#content" ).find( "h3" ).eq( 2 ).html( "new text for the third h3!" );
	
	// jQuery also provides the .end() method to get back to the original selection 
	// should you change the selection in the middle of a chain:
	$( "#content" )
		.find( "h3" ) 
		.eq( 2 )
			.html( "new text for the third h3!" )
			.end() // Restores the selection to all h3s in #content
		.eq( 0 )
			.html( "new text for the first h3!" );
});
</script>
<h1></h1>
<div id="content">
	<h3>0</h3><h3>1</h3><h3>2</h3><h3>3</h3>
</div>